﻿/*
* 只实现圆角.css实现的圆角会被覆盖.只能使用mask实现.
*
*
*/
#ifndef ROUNDFRAME_H
#define ROUNDFRAME_H

#include <QFrame>
#include <QPainterPath>

class RoundWidget : public QWidget
{
    Q_OBJECT

public:
    explicit RoundWidget(QWidget *parent = Q_NULLPTR);
    ~RoundWidget();
    void setRound(qreal m_xRadius, qreal m_yRadius);

protected:
    void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
    void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;

private:
    QSize m_size;
    qreal m_xRadius;
    qreal m_yRadius;
};

#endif // ROUNDFRAME_H
